Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for torque-driven model #66

Merged
merged 5 commits into from
Jul 3, 2023
Merged

Support for torque-driven model #66

merged 5 commits into from
Jul 3, 2023

Conversation

antoinefalisse
Copy link
Collaborator

@antoinefalisse antoinefalisse commented Jun 29, 2023

@suhlrich I added support for running torque-driven simulations. It makes the code even messier, but it is nice for testing since it is very fast. I added an example: https://github.com/stanfordnmbl/opencap-processing/blob/issue_65/example_kinetics.py#L151

When setting torque-driven to True (https://github.com/stanfordnmbl/opencap-processing/blob/issue_65/UtilsDynamicSimulations/OpenSimAD/mainOpenSimAD.py#L309), torque actuators are used instead of muscles. There is some simple dynamics (first order approximation of a time-delay of 35ms: https://github.com/stanfordnmbl/opencap-processing/blob/issue_65/UtilsDynamicSimulations/OpenSimAD/functionCasADiOpenSimAD.py#L109) and you can specify the optimal forces through the settings (example https://github.com/stanfordnmbl/opencap-processing/blob/issue_65/UtilsDynamicSimulations/OpenSimAD/settingsOpenSimAD.py#L199). By default the optimal forces are defined here: https://github.com/stanfordnmbl/opencap-processing/blob/issue_65/UtilsDynamicSimulations/OpenSimAD/muscleDataOpenSimAD.py.

Tests I have done:

  • Ran muscle-driven simulations and got same solution as before
  • Ran torque-driven simulations and got something looking okay. FYI I ran the running one and got almost the same GRFs as with the muscle driven simulation (torques were quite different though)
  • All the sanity tests pass

Question:

@antoinefalisse antoinefalisse changed the title [WIP]: Support for torque-driven model Support for torque-driven model Jun 29, 2023
@antoinefalisse antoinefalisse merged commit 60667dc into main Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant